package com.zhl.spark.core.prictase

import com.zhl.spark.core.BasicRdd

/**
 * @program: demos
 * @description: ${description}
 * @author: 刘振华
 * @create: 2020-12-17 21:03
 **/
object WebPri extends BasicRdd{
    def main(args: Array[String]): Unit = {
        test()
    }

    override def logic(): Unit = {
        sc.textFile("")
            .map(line=>{
                line.split(" ")
                (line(0),(0,0,0))
            })
            .reduceByKey((a,b)=>{
                (a._1+b._1,a._2+b._2,a._3+b._3)
            })
            .sortByKey(true)
            .take(10)
            .foreach(println)
    }


}
